/**
 * ES6允许按照一定模式从数组和对象中提取值，对变量进行赋值
 * 这被称为解构赋值
 */

// 1.数组的解构
/* const F4 = ["小沈阳", "刘能", "赵四", "宋小宝"];
let [xiao, liu, zhao, song] = F4;
console.log(xiao, liu, zhao, song); */

// 2.对象的解构
const zhao = {
  name: "赵本山",
  age: 60,
  xiaoping: function () {
    console.log("我可以演小品");
  }
};
let { name, age, xiaoping } = zhao;
console.log(name, age);
xiaoping();
